package com.lizhi.note.controller;

import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ExceptionController {

    public static final String ExceptionControllerPath = "/exception/throw";

    @RequestMapping(ExceptionController.ExceptionControllerPath)
    public void handleException(HttpServletRequest request) throws Exception {
        Exception e = (Exception) request.getAttribute("filterError");
        throw (Exception) request.getAttribute("filterError");
    }
}



